package com.bite.ch07;
class WashMachine{
    public String brand;//品牌
    public String type;//类型
    public double price;//价格
    public double weight;//重量
    public String color;//颜色
    //功能1：洗衣服
    public void washClothes(){
        System.out.println("洗衣服...");
    }
    //功能2：脱水
    public void dryClothes(){
        System.out.println("脱水...");
    }
}
public class Test {
    public static void main(String[] args) {
        /*//1.创建对象
        WashMachine washMachine=new WashMachine();
        //2.访问对象属性
        washMachine.brand="小天鹅";
        System.out.println(washMachine.brand);
        //3.访问对象方法
        washMachine.washClothes();*/

        new WashMachine().washClothes();
        new WashMachine().brand="小天鹅";
        System.out.println(new WashMachine().brand);
    }
}
